package org.jeecg.modules.biz.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.biz.entity.EventBurn;

/**
 *
 * 燃烧任务 mapper 接口
 *
 */
public interface EventBurnMapper extends BaseMapper<EventBurn> {
    @Select("select * from event_burn order by timestamp desc limit 0,1")
    EventBurn getLatestOne();

    @Select("select sum(amount) from event_burn where to_days(timestamp) = to_days(now())")
    Long totalAmount4Today();
}
